<template>
  <TableList :listApi="listApi" :showSearch="showSearch" @returnRes="returnRes">
    <template #search>
      <el-input
        v-model="showSearch.keyword"
        clearable
        placeholder="请输入域名"
      />
    </template>
    <template #table>
      <el-table :data="tableData">
        <el-table-column prop="id" label="ID" />
        <el-table-column prop="date" label="日期" />
        <el-table-column prop="name" label="姓名" />
        <el-table-column prop="address" label="地址" />
      </el-table>
    </template>
  </TableList>
</template>

<script>
import TableList from "@/components/TableList";
import http from "@/http/api/common";
export default {
  components: {
    TableList
  },
  data() {
    return {
      listApi: http.getList,
      showSearch: {},
      tableData: []
    };
  },
  methods: {
    // 返回接口数据
    returnRes(data) {
      this.tableData = data.list;
    }
  }
};
</script>
